<!DOCTYPE html>
<html>
<head>
    <title>安和寿</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

    <meta name="description" content="安和寿微信预约端">

    <link rel="stylesheet" href="${basePath}/css/weui.min.css">
    <link rel="stylesheet" href="${basePath}/css/jquery-weui.css">
    <link rel="stylesheet" href="${basePath}/css/demos.css">

</head>

<body ontouchstart>


<header class='demos-header'>
    <h1 class="demos-title">特约医生</h1>
</header>

<div class="weui-cells weui-cells_form" style="margin-top:0px;">
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label" style="color: #90969A;">医生姓名：</label></div>
        <div class="weui-cell__bd">
            <input class="weui-input" type="text" id="nickname" name="nickname" placeholder="请输入医生姓名" value="">
        </div>
    </div>
</div>
<div class="weui-cells weui-cells_form" style="margin-top:0px;">
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label" style="color: #90969A;">联系电话：</label></div>
        <div class="weui-cell__bd">
            <input class="weui-input" type="tel" id="cellphone" name="cellphone" placeholder="请输入联系电话" value="">
        </div>
    </div>
</div>

<div class="weui-cell weui-cell_select weui-cell_select-after">
    <div class="weui-cell__hd">
        <label for="" class="weui-label" style="color: #90969A;">性别：</label>
    </div>
    <div class="weui-cell__bd">
        <select class="weui-select" name="select2" id="sex">
            <option value="男" selected="">男</option>
            <option value="女">女</option>
        </select>
    </div>
</div>
<div class="weui-cell weui-cell_switch">
    <div class="weui-cell__bd" style="color: #90969A;">所属医院：</div>
</div>
<div class="weui-cell">
    <div class="weui-cell__bd">
        <input class="weui-input" type="text" id="hospital" name="hospital" placeholder="请输入所属医院" value="">
    </div>
</div>

<div class="weui-cell weui-cell_select weui-cell_select-after">
    <div class="weui-cell__hd">
        <label for="" class="weui-label" style="color: #90969A;">所属科室：</label>
    </div>
    <div class="weui-cell__bd">
        <select class="weui-select" name="select2" id="dept">
            <option value="all">全部</option>
            <option value="妇科">妇科</option>
            <option value="儿科">儿科</option>
            <option value="皮肤性病科">皮肤性病科</option>
            <option value="内科">内科</option>
            <option value="男科">男科</option>
            <option value="产科">产科</option>
            <option value="外科">外科</option>
            <option value="中医科">中医科</option>
            <option value="骨伤科">骨伤科</option>
            <option value="精神心理科">精神心理科</option>
            <option value="口腔颌面科">口腔颌面科</option>
            <option value="眼科">眼科</option>
            <option value="耳鼻咽喉科">耳鼻咽喉科</option>
            <option value="肿瘤科">肿瘤科</option>
            <option value="整形美容科">整形美容科</option>
        </select>
    </div>
</div>


<div class="weui-cell weui-cell_switch">
    <div class="weui-cell__bd" style="color: #90969A;">描述：</div>
</div>
<div class="weui-cells weui-cells_form" style="margin-top: 0">
    <div class="weui-cell">
        <div class="weui-cell__bd">
            <textarea class="weui-textarea" id="memo" name="memo" placeholder="请输入描述" rows="3"></textarea>
        </div>
    </div>
</div>

<div class="weui-btn-area">
    <a class="weui-btn weui-btn_primary" onclick="addSpecial();" id="showTooltips">确定</a>
</div>

<script src="${basePath}/js/jquery-2.1.4.js"></script>
<script src="${basePath}/js/fastclick.js"></script>
<script src="${basePath}/js/jquery-weui.js"></script>
<script>
    function addSpecial(){
        var mo=$("#memo").val();
        $.ajax({
            type: "post",
            async: false,
            url:'${basePath}/addSpecial.json',
            contentType: "application/x-www-form-urlencoded; charset=utf-8",
            data:{
                nickname: $("#nickname").val(),
                cellphone: $("#cellphone").val(),
                sex: $("#sex").val(),
                hospital: $("#hospital").val(),
                dept: $("#dept").val(),
                memo: $("#memo").val()
            },
            success: function (data) {
                $.confirm("预约成功，是否立即支付预付款？", "立即支付?", function() {
                    window.location.href =  '${basePath}/payOrder.htm?orderId='+data.t.id;
                }, function() {
                    window.location.href =  '${basePath}/detailOrder.htm?orderId='+data.t.id;
                });
            }
        });
    }

</script>


</body>
</html>
